<template>
	<view>
	<view class="like-nr" v-for="(item,index) in likegendan.slice(0,1)" :key="index" v-if="index>=0">
		<image :src="likegendan[index].coverImgUrl" mode="" class="like-nr_img1"></image>
		<text class="like-nr_text1">{{likegendan[index].name}}</text>
		<text class="like-nr_text2">{{likegendan[index].trackCount}}首</text>
	</view>
	</view>
</template>

<script>
	export default{
		data(){
			return{
				likegendan:[]
			}
		},
		mounted() {
			this.getlikegendan()
		},
		methods:{
			getlikegendan(){
				uni.request({
					url:'http://localhost:3000/user/playlist?uid=361542888',
					method:'POST',
					success: (res) => {
						this.likegendan = res.data.playlist
					}
				})
			}
		}
	}
</script>

<style lang="scss">
	.like-nr{
		margin-top: 40rpx;
		margin-left:20rpx;
		width: 700rpx;
		height:150rpx;
		padding-top: 20rpx;
		position: relative;
		background-color:#fff;
		border-radius: 20rpx;
	}
	.like-nr_img1{
		width:100rpx;
		height:100rpx;
		margin-left:40rpx;
		border-radius: 15rpx;
		box-shadow: 2px 1px #C0C4CC;
	}
	.like-nr_img2{
		width:50rpx;
		height:50rpx;
		position: absolute;
		top:45rpx;
		right:30rpx
	}
	.like-nr_text1{
		position: absolute;
		top:30rpx;
		left:160rpx;
		font-weight: 600;
		font-size: 30rpx;
		color: #333333;
		letter-spacing: 1px;
	}
	.like-nr_text2{
		position: absolute;
		top:75rpx;
		left:160rpx;
		font-size: 10rpx;
		color: #979797;
		letter-spacing: 1px;
	}
</style>
